/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sh.ndt.schedule.service;

import com.sh.ndt.exception.DAOException;
import com.sh.ndt.exception.ServiceException;
import com.sh.ndt.login.service.LoginServiceImpl;
import com.sh.ndt.schedule.dao.ScheduleDAO;
import com.sh.ndt.schedule.entity.ExamSchedule;
import com.sh.ndt.user.entity.UserDashboardDetail;
import java.util.logging.Level;
import org.apache.log4j.Logger;

/**
 *
 * @author Prashanth
 */
public class ScheduleServiceImpl implements ScheduleService{

    
    private static final long serialVersionUID = 1L;
    private static Logger LOGGER = Logger.getLogger(ScheduleServiceImpl.class);
    ScheduleDAO scheduleDao;
    
    public ScheduleServiceImpl() {
        LOGGER.debug("************************** Schedule Service: Initialized");
    }    
    
     public ScheduleServiceImpl(ScheduleDAO scheduleDao) {
        LOGGER.debug("************************** ScheduleServiceImpl: Initialized");
        this.scheduleDao = scheduleDao;
    }   
     
    @Override
    public UserDashboardDetail addNewSchedule(ExamSchedule examSchedule) throws ServiceException {
        UserDashboardDetail outcome = null;
        try {
            outcome = scheduleDao.addNewSchedule(examSchedule);
        } catch (DAOException ex) {
            LOGGER.debug(ex);
        }
        return outcome;
    }
    
}
